-
Notifications
You must be signed in to change notification settings - Fork 3
feat(connectors): add pull command #214
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Paveltarno
wants to merge
17
commits into
main
Choose a base branch
from
task-1-connectors-pull
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
+2,256
−385
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Contributor
🚀 Package Preview Available!Install this PR's preview build with npm: npm i @base44-preview/cli@0.0.30-pr.214.4036a54Prefer not to change any import paths? Install using npm alias so your code still imports npm i "base44@npm:@base44-preview/cli@0.0.30-pr.214.4036a54"Or add it to your {
"dependencies": {
"base44": "npm:@base44-preview/cli@0.0.30-pr.214.4036a54"
}
}
Preview published to npm registry — try new features instantly! |
Add connector resource module supporting 12 OAuth providers: googlecalendar, googledrive, gmail, googlesheets, googledocs, googleslides, slack, notion, salesforce, hubspot, linkedin, tiktok. - Zod discriminated union schema with type discriminator per provider - JSDoc links to official OAuth scope documentation for each provider - JSONC file reading with validation (filename must match type field) - API response schemas for upstream connector state - Unit tests with fixtures for valid, invalid, and mismatched connectors Part of: #184 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add API client methods for OAuth connector operations: - listConnectors: list all connectors for current app - syncConnector: sync connector with exact scope matching - getOAuthStatus: poll OAuth authorization status - removeConnector: remove a connector integration Also update response schemas and clean up verbose comments. Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
* feat(connectors): implement push logic for syncing connectors Add pushConnectors function that: - Syncs all local connectors via /sync endpoint - Removes upstream-only connectors not in local config - Returns typed results (synced, removed, needs_oauth, error) Includes unit tests covering all scenarios. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * feat(connectors): add OAuth flow handling with browser redirect and polling (#192) * feat(connectors): add OAuth flow handling with browser redirect and polling Add runOAuthFlow function that: - Opens OAuth redirect URL in browser - Polls getOAuthStatus until ACTIVE or FAILED - Returns PENDING on timeout (5 minutes) Uses p-wait-for TimeoutError for robust timeout detection. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * connectors: base44 connectors push (#194) * final connector work sofi 1 * scopes --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Change provider field from closed enum to flexible union that accepts both known providers (googlecalendar, notion, slack, etc.) and any arbitrary provider string. This enables users to configure custom OAuth providers without waiting for first-class Base44 support. Schema changes: - Add GenericConnectorSchema for arbitrary provider types - Update ConnectorResourceSchema to union of specific + generic schemas - Update IntegrationTypeSchema to accept known enum OR any non-empty string - Only reject empty strings Test coverage: - Verify known providers continue to work - Verify arbitrary providers are accepted - Verify empty strings are rejected - All 137 tests passing Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
7bfb43f to
7b418ac
Compare
Implements fetchConnectors() API, writeConnectors() for file sync, and the CLI pull command following the agents pull pattern. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
f4d2ac1 to
02d5fd7
Compare
3fc2e0c to
ec69f63
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Note
Description
Adds a new
connectors pullcommand that syncs connector configurations from the Base44 server to local files. This command fetches remote connectors via the API and intelligently writes/updates/deletes local connector files to match the server state, preserving custom file names and comments where possible.Related Issue
None
Type of Change
Changes Made
connectors pullcommand that fetches connectors from Base44 and syncs to local fileswriteConnectors()function inconnector/config.tsthat handles intelligent file writing:my-slack.jsonc) when updating connectors by typefetchConnectors()API wrapper function as alias forlistConnectors()writeConnectors()covering edge cases (duplicate types, file preservation, empty lists)Testing
npm test)Checklist
Additional Notes
The
writeConnectors()function uses deep equality comparison to detect changes, ensuring local files are only rewritten when the data actually differs. This preserves user comments and custom formatting in connector config files. The function also handles type-based file matching rather than filename-based matching, allowing users to name their connector files however they prefer.🤖 Generated by Claude | 2026-02-11 23:47 UTC